<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>登录</title>
	<link rel="stylesheet" href="/scriptZIP/index.css">
</head>

<body>
	<div id="login_WQ">
		<el-container>
			<el-header></el-header>
			<el-main v-loading="loading"></el-main>
		</el-container>
	</div>
	<script src="https://cdn.w7.cc/ued/console/jssdkv2.js"></script>

	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>
	<script src="/scriptZIP/flatpickr.min.js"></script>
	<script src="/scriptZIP/zh.min.js"></script>
	<script src="https://unpkg.com/element-ui/lib/index.js"></script>

	<script src="/lib/vue-flatpickr.min.js"></script>
	<!-- <script src="https://cdn.bootcdn.net/ajax/libs/js-cookie/3.0.5/js.cookie.js"></script> -->
	<!-- <script src="/js/common.js"></script> -->
	<script>
		new Vue({
			el: '#login_WQ',
			data: {
				code: "",
				loading:false,
			},
			mounted: function () {

				w7.ready(function () {
					w7.login(function (evt) {
						this.code = evt.data.code;
						// console.log(this.code, 'code1');
						axios.postForm('https://wei.hxt5.com/api/wq', { code: this.code }).then(function (e) {
							axios.postForm('https://wei.hxt5.com/api/login', e.data).then(function (res) {
								setTimeout(() => {
									this.loading=true
									location.href = '/overview.html'
								}, 2000)

							}.bind(this));

						}.bind(this));

					});
					// setTimeout(function () {
					// 	setInterval(function () {
					// 		w7.login(function (evt) {
					// 			this.code = evt.data.code;
					// 			console.log(this.code, 'code2');
					// 			axios.postForm('https://wei.hxt5.com/api/wq', { code: this.code }).then(function (e) {
					// 				axios.postForm('https://wei.hxt5.com/api/login', e.data).then(function (res) {
					// 				}.bind(this));
					// 			}.bind(this));

					// 		});
					// 	}, 3000);
					// 	// 25 * 60 * 60 * 1000
					// }, 10000);
				})
			}
		})
	</script>
</body>

</html>